package com.park.common.poo;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by Administrator on 2017-11-12.
 */
@Entity
@Table(name = "personality_info", schema = "", catalog = "totem")
public class PersonalityInfo {
    private Integer personalityId;
    private String personalityTitle;
    private String personalityImg;
    private String personalityUrl;
    private Integer personalitySeq;
    private String createTime;
    private String updateTime;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "personalityId")
    public Integer getPersonalityId() {
        return personalityId;
    }

    public void setPersonalityId(Integer personalityId) {
        this.personalityId = personalityId;
    }

    @Basic
    @Column(name = "personalityTitle")
    public String getPersonalityTitle() {
        return personalityTitle;
    }

    public void setPersonalityTitle(String personalityTitle) {
        this.personalityTitle = personalityTitle;
    }

    @Basic
    @Column(name = "personalityImg")
    public String getPersonalityImg() {
        return personalityImg;
    }

    public void setPersonalityImg(String personalityImg) {
        this.personalityImg = personalityImg;
    }

    @Basic
    @Column(name = "personalityUrl")
    public String getPersonalityUrl() {
        return personalityUrl;
    }

    public void setPersonalityUrl(String personalityUrl) {
        this.personalityUrl = personalityUrl;
    }

    @Basic
    @Column(name = "personalitySeq")
    public Integer getPersonalitySeq() {
        return personalitySeq;
    }

    public void setPersonalitySeq(Integer personalitySeq) {
        this.personalitySeq = personalitySeq;
    }

    @Basic
    @Column(name = "createTime")
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "updateTime")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PersonalityInfo that = (PersonalityInfo) o;

        if (personalityId != null ? !personalityId.equals(that.personalityId) : that.personalityId != null)
            return false;
        if (personalityImg != null ? !personalityImg.equals(that.personalityImg) : that.personalityImg != null)
            return false;
        if (personalityUrl != null ? !personalityUrl.equals(that.personalityUrl) : that.personalityUrl != null)
            return false;
        if (personalitySeq != null ? !personalitySeq.equals(that.personalitySeq) : that.personalitySeq != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = personalityId != null ? personalityId.hashCode() : 0;
        result = 31 * result + (personalityImg != null ? personalityImg.hashCode() : 0);
        result = 31 * result + (personalityUrl != null ? personalityUrl.hashCode() : 0);
        result = 31 * result + (personalitySeq != null ? personalitySeq.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
